/*
 * This file is part of Catfish.
 * Copyright (C) 2010 Namazu Studios LLC
 * 
 * Catfish is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as 
 * published by the Free Software Foundation, either version 3 of 
 * the License, or (at your option) any later version.
 * 
 * Catfish is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with Catfish.  If not, please visit:
 *  
 * http://www.gnu.org/licenses/
 *  
 */
package com.namazustudios.catfish.exception;

import com.namazustudios.catfish.CatfishException;

/**
 * An exception that is raised when Catfish does not know what type of object is
 * associated with the given Kind.
 * 
 * @author patrick
 * 
 */
public class NoSuchTypeException extends CatfishException {

    private static final long serialVersionUID = -4881627512694517491L;

    private final String kind;

    /**
     * Gets the Kind of type requested.
     * 
     * @return the Kind of type requested.
     */
    public final String getKind() {
        return kind;
    }

    public NoSuchTypeException(String kind) {
        super("Specified kind \"" + kind + "\" is not known to this Catfish instance.");
        this.kind = kind;
    }

    public NoSuchTypeException(String kind, String message, Throwable cause) {
        super(message, cause);
        this.kind = kind;
    }

    public NoSuchTypeException(String kind, String message) {
        super(message);
        this.kind = kind;
    }

    public NoSuchTypeException(String kind, Throwable cause) {
        super("Specified kind \"" + kind + "\" is not known to this Catfish instance.", cause);
        this.kind = kind;
    }

}
